//
//  HsSecureHander.h
//  hundsun_zjfae
//
//  Created by 王金东 on 14-8-22.
//  Copyright (c) 2014年 王金东. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CommonCrypto/CommonCryptor.h>

@interface HsSecureHander : NSObject

//加密
+ (NSData*)AES256Encrypt:(NSString*)strSource withKey:(NSString*)key;

//解密
+ (NSString*)AES256Decrypt:(NSData*)dataSource withKey:(NSString*)key;


+ (NSString *)dataToString:(NSData *)data;


//加密后的 NSString 转换成 加密后的 NSData
+ (NSData*)stringToNsdata:(NSString* )result;

@end


@interface NSData (CCCryptUtil)
- (NSData*)AES256EncryptWithKey:(NSString*)key;
- (NSData*)AES256DecryptWithKey:(NSString*)key;
@end
